package one.stand.service;

import one.stand.entity.websocket.CompanyInfoEntity;
import one.stand.model.BusinessCardModel;
import one.stand.model.ResultModel;
import one.stand.request.BusinessCardRequest;
import one.stand.request.CallsPhoneRecordRequest;
import one.stand.request.UserCommonRequest;
import one.stand.response.BusinessCardResponse;
import one.stand.response.GetCompanyStaffResponse;
import one.stand.response.UserCommonResponse;
import org.springframework.scheduling.annotation.Async;

import java.util.List;
import java.util.Map;

/**
 * @author Administrator
 */
public interface BusinessCardService {

    /**
     * crm端查询名片列表
     *
     * @param request
     * @return
     */
    ResultModel<List<BusinessCardResponse>> selectBusinessCardList(BusinessCardRequest request);

    /**
     * crm端查询名片列表
     *
     * @param request
     * @return
     */
    ResultModel<Boolean> updateCardWelcomeSpeech(BusinessCardRequest request);

    /**
     * 审核名片
     *
     * @param request
     * @return
     */
    ResultModel<Boolean> auditBusinessCard(BusinessCardRequest request);

    /**
     * 获取公司员工
     *
     * @param request
     * @return
     */
    ResultModel<Map<String, Object>> getCompanyStaffList(BusinessCardRequest request);

    /**
     * 得到公司员工信息
     *
     * @param request
     * @return
     */
    ResultModel<GetCompanyStaffResponse> getCompanyStaffInfo(BusinessCardRequest request);

    /**
     * 手动创建客户
     *
     * @param request
     * @return
     */
    ResultModel<Integer> manualAdd(BusinessCardRequest request);

    /**
     * 手动修改客户
     *
     * @param request
     * @return
     */
    ResultModel updAdd(BusinessCardRequest request);

    /**
     * 模糊查询获取客户列表
     *
     * @return
     */
    ResultModel<List<BusinessCardResponse>> getList(BusinessCardRequest request);

    /**
     * 获取成员信息
     *
     * @return
     */
    ResultModel getCompanyUserInfo(BusinessCardRequest request);

    /**
     * 消息服务获取公司信息
     *
     * @param cardId
     * @return
     */
    ResultModel<CompanyInfoEntity> messageGetCompanyInfo(Long cardId);

    /**
     * 得到名片海报
     *
     * @param request
     * @return
     */
    ResultModel getCardPoster(BusinessCardRequest request);

    /**
     * 得到名片二维码
     */
    ResultModel getWxTwoCode(BusinessCardRequest request);

    ResultModel<BusinessCardResponse> getCardPhone(BusinessCardRequest request);

    /**
     * 发送给crm端的员工
     *
     * @param sendUserId 发送人userId
     * @param receiveUserId 接收人userId
     * @param text 聊天消息提示內容
     * @param type 0未读消息提示，1联系方式提示
     * @return
     */
    ResultModel unreadMessage(Integer sendUserId, Integer receiveUserId, String text, Integer type);

    /**
     * 验证名片是否过期
     *
     * @param request
     * @return
     */
    ResultModel<Long> verifyExpired(BusinessCardRequest request);

    /**
     * 用户可接收微信推送次数
     *
     * @param request
     * @return
     */
    ResultModel<Integer> formIdCount(BusinessCardRequest request);

    /**
     * 用户可接收微信推送次数
     *
     * @param request
     * @return
     */
    ResultModel<Boolean> delFormId(BusinessCardRequest request);

    /**
     * 查询用户常用语（3.2版本迭代）
     *
     * @param request
     * @return
     */
    ResultModel<List<UserCommonResponse>> selectUserCommonList(UserCommonRequest request);

    /**
     * 新增/修改用户常用语（3.2版本迭代）
     *
     * @param request
     * @return
     */
    ResultModel<Boolean> insertUserCommonList(UserCommonRequest request);

    /**
     * 删除用户常用语（3.2版本迭代）
     *
     * @param request
     * @return
     */
    ResultModel<Boolean> delUserCommonList(UserCommonRequest request);

    /**
     * 上下移动用户常用语（3.2版本迭代）
     *
     * @param request
     * @return
     */
    ResultModel<Boolean> moveUserCommon(UserCommonRequest request);
}
